{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import math\n",
    "import random\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "from numpy import mean, std\n",
    "\n",
    "def CalcWeight(x):\n",
    "    m, n = x.shape\n",
    "    s = np.zeros((1,1), dtype=float)\n",
    "    cv = np.zeros((1,n), dtype=float)\n",
    "    weight = np.zeros((1,n), dtype=float)\n",
    "    \n",
    "    for i in range(n):\n",
    "        cv[0][i] = std(x_data[:,i])/mean(x_data[:,i])\n",
    "        \n",
    "    s = np.sum(cv, axis=1)\n",
    "    \n",
    "    for j in range(n):\n",
    "        weight[0][j] = cv[0][j] / s\n",
    "    return weight"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [],
   "source": [
    "def initCentroid(x,k):\n",
    "    n = np.size(x,0)\n",
    "    idx_rand = np.array(random.sample(range(1,n), k))\n",
    "    centroid = x[idx_rand, :]\n",
    "    return centroid\n",
    "\n",
    "def __check_params(data, k, weights, max_iter, tol):\n",
    "    if k <= 0 or k > data.shape[0]:\n",
    "        raise ValueError(\"k must be > 0 and <= {}, got {}\".format(data.shape[0], k))\n",
    "\n",
    "    if weights.size != data.shape[1]:\n",
    "        raise ValueError(\"weights length expected {}, got {}\".format(data.shape[0], len(weights)))\n",
    "\n",
    "    if max_iter <= 0:\n",
    "        raise ValueError(\"max_iter must be > 0, got {}\".format(max_iter))\n",
    "\n",
    "    if tol < 0.0:\n",
    "        raise ValueError(\"tol must be >= 0.0, got {}\".format(tol))\n",
    "        \n",
    "def sqrsum(x):\n",
    "    return np.sum(x * x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn import preprocessing\n",
    "\n",
    "orig_data = pd.read_excel('test4.xlsx')\n",
    "orig_data.dropna(inplace=True)\n",
    "\n",
    "x_orig_data = orig_data.drop('TRUE VALUE',axis=1)\n",
    "y_label = orig_data['TRUE VALUE']\n",
    "\n",
    "process = preprocessing.MinMaxScaler()\n",
    "x_data = process.fit_transform(x_orig_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[5.65092166e-01 5.61224490e-02 1.65671642e-01 3.82775120e-03\n",
      "  5.15091848e-01 3.76470588e-02 2.04447633e-01 1.83961337e-01\n",
      "  3.95519547e-01]\n",
      " [5.89017857e-01 2.04081633e-04 7.46268657e-09 1.72248804e-03\n",
      "  2.17525663e-01 1.08152941e-02 9.28388508e-01 1.70067636e-04\n",
      "  4.10733105e-01]]\n"
     ]
    }
   ],
   "source": [
    "n_iters = 5\n",
    "n_clusters = 2\n",
    "centroids = np.zeros((n_clusters,30), dtype=float)\n",
    "centroids = initCentroid(x_data, n_clusters)\n",
    "print(centroids)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Kmeans Finish!\n",
      "(474, 9) (498, 9)\n"
     ]
    }
   ],
   "source": [
    "loss = np.zeros(n_iters)\n",
    "\n",
    "dist = np.zeros((x_data.shape[0],n_clusters), dtype=float)\n",
    "\n",
    "for i in range(n_iters):\n",
    "    for j in range(x_data.shape[0]):\n",
    "        distance = np.power(x_data[j,:]-centroids, 2)  \n",
    "        distance = np.sum(distance, axis=1)\n",
    "        distance = np.sqrt(distance) \n",
    "        dist[j,:] = distance\n",
    "    idx = np.argmin(dist, axis=1)\n",
    "    loss[i] = np.mean(np.min(dist, axis=1))\n",
    "    \n",
    "    for k in range(n_clusters):\n",
    "        d = x_data[idx==k, :]\n",
    "        if k == 0:\n",
    "            data1 = d\n",
    "        else:\n",
    "            data2 = d\n",
    "        centroids[k,:] = np.mean(d, axis=0)\n",
    "print(\"Kmeans Finish!\")\n",
    "print(data1.shape, data2.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "initial centroids are: [[5.91013825e-01 0.00000000e+00 1.18805970e-01 4.88995215e-01\n",
      "  2.01771627e-01 3.64705882e-02 4.19296987e-01 2.41545705e-02\n",
      "  4.07307347e-01]\n",
      " [5.86767485e-01 6.12244898e-04 1.00000000e-05 1.10047847e-03\n",
      "  2.20256057e-01 1.05882353e-02 9.24794051e-01 2.84038653e-04\n",
      "  4.09323511e-01]]\n",
      "CVWKmeans Finish!\n",
      "(197, 9) (775, 9)\n",
      "[9.31059554e-02 7.27233025e-06 0.00000000e+00 0.00000000e+00\n",
      " 0.00000000e+00]\n"
     ]
    }
   ],
   "source": [
    "from sklearn import preprocessing\n",
    "\n",
    "orig_data = pd.read_excel('test4.xlsx')\n",
    "orig_data.dropna(inplace=True)\n",
    "\n",
    "x_orig_data = orig_data.drop('TRUE VALUE',axis=1)\n",
    "y_label = orig_data['TRUE VALUE']\n",
    "\n",
    "process = preprocessing.MinMaxScaler()\n",
    "x_data = process.fit_transform(x_orig_data)\n",
    "\n",
    "n_iters = 5\n",
    "n_clusters = 2\n",
    "centroids = initCentroid(x_data, n_clusters)\n",
    "print(\"initial centroids are:\",centroids)\n",
    "\n",
    "w = CalcWeight(x_data)\n",
    "tol=1e-7\n",
    "C = np.zeros(n_iters)\n",
    "__check_params(x_data, 2, w, n_iters, tol)\n",
    "\n",
    "for i in range(n_iters):\n",
    "    old_centroids=centroids.copy()\n",
    "    for j in range(x_data.shape[0]):\n",
    "        distance = np.power(x_data[j,:]-centroids, 2)  \n",
    "#        print(x_data[j,:].shape,centroids.shape, distance.shape)\n",
    "        distance = np.sum(w*distance, axis=1)\n",
    "#        print(distance.shape)\n",
    "        distance = np.sqrt(distance) \n",
    "        dist[j,:] = distance\n",
    "    idx = np.argmin(dist, axis=1)\n",
    "    loss_w[i] = np.mean(np.min(dist, axis=1))\n",
    "\n",
    "    for k in range(n_clusters):\n",
    "        d = x_data[idx==k, :]\n",
    "        if k == 0:\n",
    "            data1 = d\n",
    "        else:\n",
    "            data2 = d\n",
    "        centroids[k,:] = np.mean(d, axis=0)\n",
    "    \n",
    "    centroid_change=sqrsum(centroids - old_centroids)\n",
    "    C[i]=centroid_change\n",
    "    if centroid_change <= tol:\n",
    "            break\n",
    "print(\"CVWKmeans Finish!\")\n",
    "print(data1.shape,data2.shape)\n",
    "print(C)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAoxUlEQVR4nO3deZwUhZn/8c/jcDMoCMiqiGDEA+QcQFiVIxoEMYKKEVCMzCTGjRg3+elG118kxv3tJtG4RuMZo4ZEJcYriCKKDqKJGMEDFTwQUUaMHCqnRGGe3x9VDU3bM1M9093VM/19v171mq6u60sB/UzX8ZS5OyIiIqn2ijuAiIgUJhUIERFJSwVCRETSUoEQEZG0VCBERCStZnEHyKZOnTp59+7d67Xs1q1badu2bXYDZYFyZUa5MqNcmWmKuZYsWbLe3TunnejuTWYoKyvz+qqsrKz3srmkXJlRrswoV2aaYi5gsdfwmapDTCIikpYKhIiIpKUCISIiaTWpk9Qikj1ffvklVVVVbN++Pe/b3meffVi+fHnet1uXxpyrVatWdO3alebNm0derwqEiKRVVVVFu3bt6N69O2aW121v3ryZdu3a5XWbUTTWXO7Ohg0bqKqqokePHpHXW/SHmHbuhDlzYObMg5kzJxgXEdi+fTsdO3bMe3GQ7DMzOnbsmPG3waL+BrFzJ5x4IrzwAmzd2p0//xmOPhrmzYOSkrjTicRPxaHpqM/fZVF/g5g7FxYtgi1bwN3YsiUoFnPnxp1MRCR+RV0gXn4Ztm3b872tW+GVV2KJIyI58Nlnn3HTTTdlvNzixYv5wQ9+kHZa9+7dWb9+faT1/PSnP+Waa67JePuFoKgLxIABkHp3etu20L9/LHFEGrXE+byrrqKgzufVViB21hJy0KBBXH/99bmK1SgUdYEYOzY459CmTTDeokUwPnZsvLlEGpvE+bzJk2HGjODniSc2vEjMnDmTvn370q9fP6ZOnQrAunXrOP300xk8eDCDBw/mr3/9KxD8pl5eXs7IkSM55JBDdn24X3rppbz77rv079+fSy65hAULFjBq1CimTJlCnz592L59O9OmTaNPnz4MGDCAyspKABYsWMDJJ58MwIYNGxg9ejTHHnss3/ve9/AansT5+OOPM3DgQPr168fxxx+/6/1ly5Z9JRfAhAkTKCsro3fv3tx222273i8tLeXyyy+nX79+DB06lI8//hiAd999l6FDhzJ48GCuuOIKSktLdy1z9dVXM3jwYPr27cuMGTMatuMTaurB0RiH+vRi2rHD/ZFH3Lt02eYHHOD+5ZcZryKnmmLvl1xSrszUlmvZsmW7Xl90kfuIETUPRx3lvtde7rB72Guv4P2alrnooppzbdq0yV9//XU/7LDDfN26de7uvmHDBnd3nzx5sj/77LPu7v7+++/7EUcc4e7uM2bM8GHDhvn27dt93bp1vu+++/oXX3zh7733nvfu3XuPP3ObNm185cqV7u5+zTXX+Lnnnuvu7suXL/eDDjrIP//8c6+srPRx48a5u/uFF17oV155pW/atMnnzJnjwK5cCWvXrvWuXbvuWm8ib025kufZtm2b9+7d29evX+/u7oDPnj3b3d0vueQSv+qqq9zdfdy4cX7PPfe4u/vNN9/sbdu2dXf3hx56yL/73e96dXW179y508eNG+fPPPNMrX+nCagXU81KSuDkk+Hcc99nzZrgpLWIZGbLFqiu3vO96urg/fp6+umnmThxIp06dQJg3333BWD+/PlMnz6d/v37c8opp7Bp0yY2b94MwLhx42jZsiWdOnViv/322/Wbd6ohQ4bsuh/gueee2/Xt5IgjjuDggw/m7bff3mP+hQsXcvbZZ+/aRocOHb6yzkWLFjF8+PBd603krS3X9ddfv+tbwurVq3nnnXcAaNGixa5vL2VlZaxatQqA559/njPOOAOAKVOm7LGvnnjiCQYMGMDAgQN58803d62rIYr6MtdkI0as5cYbj+COO+DYY+NOI1JYrruu9ulz5gSHlZILQmkp3HBD8AtYfbh72kszq6uref7552nduvVXprVs2XLX65KSEnbs2JF23cmtsb2Gw0Wp6rpMtKa8NeVasGAB8+fP5/nnn6dNmzaMHDly130KzZs337Wu2v4cydu+7LLL+N73vhfpzxJV0X+DSGjduppJk+C++yD8ZUREIkqczystBbPgZ0PP5x1//PHcd999bNiwAYBPPvkEgNGjR/Ob3/xm13yv1HHZYbt27XZ9w0hn+PDh3H333QC8/fbbfPDBBxx++OE1zjN37lw+/fTTr6xn2LBhPPPMM7z33nt75K3Jxo0b6dChA23atOHNN99kUYTDF0OHDuWBBx4AYNasWbveP/7447njjjvYElboDz/8kLVr19a5vrqoQCSpqAguc/3Tn+JOItK4lJQEN5jeey/87GfBz4becNq7d28uv/xyRowYQb9+/fjRj34EBIdlFi9eTN++fenVqxe33HJLrevp2LEjxxxzDEcddRSXXHLJV6Z///vfZ+fOnfTp04czzzyTu+66a4/f+AFmzJjBwoULOe6443jiiSfo1q3bV9bTuXNnbrvtNk477TT69evHmWeeWWuuMWPGsGPHDvr27ctPfvIThg4dWtcu4brrruPaa69lyJAhfPTRR+yzzz5AUCCmTJnCsGHD6NOnDxMnTqy1KEZW08mJxjg09IFB1dXuRx7pPmxYvVeTdY3x5GaclCszUU9S59umTZti23Zt4s61detWr66udnf3e++910855RR3j54r05PUOgeRxCz4FnHxxbB8ORx5ZNyJRER2W7JkCdOnT8fdad++PXfccUdOt6dDTCmmToVmzSDH+11EJGPHHXccr776KkuXLmXhwoUceuihOd2eCkSK/faDb34TZs6EL7+MO41IvDziFT5S+Orzd6kCkUZFBaxdC48+GncSkfi0atWKDRs2qEg0Ae7B8yBatWqV0XI6B5HGiSfC/vvD734HEybEnUY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YvACPMrFN4Ansy8EwGOTYTPEY1YR5wYVj4MLMBNSy3D8EzDL4MzyUkfuNPXV+yhQSFhfDQUjeCP7cIoAIhjdOvgOSrmX5L8KH8dyD1N+uo3iL4IJ8LnB8eWrmd4PDKS+GJ3Vup4zfpsLXyZUAl8Crwkrv/JYMclUCvxElq4CqCgrc0zHBVDcvdDQyy4EH2ZxG283b3DQTnTl5PPTkO3ASUmNlrwJ+Ac8NDcSKAurmKiEgN9A1CRETSUoEQEZG0VCBERCQtFQgREUlLBUJERNJSgRARkbRUIEREJK3/D3RJHDSPD3I3AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.plot(np.arange(n_iters)+1, C, color='blue', marker='o', markersize=5, label='centroid change')\n",
    "plt.grid(True)\n",
    "plt.xlabel(\"Number of iteration\")\n",
    "plt.ylabel(\"centroid change\")\n",
    "plt.legend(loc='best')\n",
    "#plt.ylim([0.01, 0.5])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.06332243, 0.06371305, 0.06371305, 0.06371305, 0.06371305])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loss_w"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXM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gbPOgsmTYefOsKMRCU/zu5tjf7CYR/O7m+/39ubNm0daWhqjRo0qnJeVlcWPf/xjhg8fHpMIFixYwBFHHMGRRx5Jnz59Cr/4Fy1axKhRowqPEJYsWUKXLl1Ijbrl+ZprrmHTpk08+eSTpKQEX3MZGRmMHj2arl270r9/f5YsWUJ2djZt2rRhxowZAOzevZsbbriB7t2707FjRx588EEA8vLyOPnkk+nSpQuZmZlMnz4dgHXr1nHcccdx6aWX0r59e0499VT+97//AXDvvfcWlqIeNmxYme3y7bffcvbZZ9OxY0d69epVWO5i/vz5ZGVlkZWVRefOndm6dStffvklffv2JSsriw4dOhSW1a4IJYJS5OQEZXhfeinsSEQSJ/vx7GKPvy/9OwA/7PqBr7d9Xew1BfO++eGbYq8tz3vvvUfXrl1LXNaxY0dSUlJ4++23AZg8eTLnnnsuQMwRwaJFi+jbty/16tVj69atLFq0iD59+hRu5+mnn2b58uVMnjyZOnX2VtHZtm0b2dnZLF++nEaNGvG73/2OV155hWnTphWWl3j00Udp0qQJS5cuZenSpTz88MN8+umnpKenM23aNFasWMG8efO47rrrCrubPv74Y6688kpWrVrFAQccwLPPPgvAnXfeyVtvvcU777zDhAkTymyXsWPH0rlzZ9555x1uv/12LrroIgDuvvtu7r//flauXMnChQupX78+Tz/9NAMGDGDlypW8/fbbZGVlldvu5VEiKMWAAXDwweoeEqlKBUcF+fn5TJ8+nSFDhgDBkJE7d+7kq6++4sMPP+SYY46he/fuLF68mEWLFnH88ccXbqNLly6sX7+eJUuWxGy7bt26nHbaaQBkZmbSr18/0tLSyMzMLCxN/fLLL/Pkk0+SlZVFz5492bRpEx9//DHuzo033kjHjh3p378///nPf/j66yAhtm7duvDLOLrMdceOHRkxYgRPPfVUTEIqyb///W9ycnIAOOmkk9i0aRNbtmyhT58+/PrXv+bee+9l8+bN1KlTh+7du/PYY49x88038+6771ZKCQ4VnStFWhoMGwYPPQSbN8MBB4QdkUjly704t9RlDdLKrqPftEHTMl9fkvbt25dZGXT48OGceuqp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R8wZtgI+AOcDlkRLhmNnRVv6gMIuBfmbWNHIieTgwfx/i2Ao0ipqeA1wdSXCYWedSXteEYByHXZG+/oJf8EW3F20BQQIh0iV0BMH7FgGUCKR6+zMQffXQwwRfvkuAor+U4/URwRf2i8CoSJfIIwTdIisiJ1gfpJxfxpHRoX4LzAPeBla4+76UBJ4HtCs4WQzcSpDY3onEcGspr5sIdDOzZQRf7h9G4tlEcG7jvaInqYG/A6lm9i7wDHBxpAtNBFD1URGRpKcjAhGRJKdEICKS5JQIRESSnBKBiEiSUyIQEUlySgQiIklOiUBEJMn9fyS3YhVLOGMIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.figure()\n",
    "plt.plot(np.arange(n_iters)+1, loss, color='blue', marker='o', markersize=5, label='Kmeans loss')\n",
    "plt.plot(np.arange(n_iters)+1, loss_w, color='green', linestyle='--', marker='s', markersize=5, label='CVWKmeans loss')\n",
    "\n",
    "plt.grid(True)\n",
    "plt.xlabel(\"Number of iteration\")\n",
    "plt.ylabel(\"Number of loss\")\n",
    "plt.legend(loc='best')\n",
    "plt.ylim([0.01, 0.5])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
